package com.weishi.project.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.fasterxml.jackson.annotation.JsonValue;

/**
 * 类型枚举
 **/
public enum TypeEnum {

    /**
     * 个人请假状态 （ 1、离队 2、外训 3、请假 4、生病 5、受伤 6、过敏 ）
     */
    TRAINING(2,"外训"),
    PERSONAL_LEAVE(3,"事假"),
    SICK_LEAVE(4,"病假"),
    INJURY(5,"伤病"),
    ALLERGY(6,"过敏");

    TypeEnum(int code, String value) {
        this.code = code;
        this.value = value;
    }

    @JsonValue
    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public int getCode() {
        return code;
    }

    @EnumValue
    private final  int code;
    private String value;

}

